package com.maopuyu.controllers;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.maopuyu.entity.*;
import com.maopuyu.services.DistrictSchoolService;
import com.maopuyu.services.EnglishItemService;
import com.maopuyu.services.HosingEstateService;
import com.maopuyu.utils.CommonUtils;
import com.maopuyu.utils.RequestUtils;
import com.maopuyu.utils.WXReturnMsgUtils;
import com.maopuyu.utils.XMLBuilder;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@RestController
@RequestMapping(value = "/")
@CrossOrigin
public class ElishItemController {
    @Autowired
    private EnglishItemService englishItemService;

    @RequestMapping(value = "/item", method = RequestMethod.GET)
    public String englishItemAccess(@RequestParam("id") Integer id) throws JsonProcessingException {
        System.out.println(id);
        return CommonUtils.obj2Json(englishItemService.findEnglishItemById(id));
    }
}
